//h5接收路由传参
//name为?后的参数名
export default (name) => {
	const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
	const search = window.location.search.split('?')[1] || window.location.hash.split('?')[1];
	const r = search.match(reg) || [];
	return r[2];
}
